template competitive programming java

67

template competitive programming java -

static class FastScanner {
		BufferedReader br;
		StringTokenizer st;
		
		FastScanner(){
		    br=new BufferedReader(new InputStreamReader(System.in));
		    st=new StringTokenizer("");
		}
		
		String next() {
			while (!st.hasMoreTokens())
				try { 
                                        st=new StringTokenizer(br.readLine());				               
                                } catch (IOException e) {}
			return st.nextToken();
		}
		
		String nextLine(){
		    return br.nextLine();
		}
		
		String[] nextArray(){
		    return br.nextLine().split(" ");
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
	}

Comments

Submit
0 Comments